package com.whh;

import com.whh.business.entry.aaaXml.Root;
import com.whh.business.entry.bbb.BookRoot;
import com.whh.parseData.parseXml.ParseXml;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.File;

@SpringBootApplication
public class Start {
    public static void main(String[] args) {
        SpringApplication.run(Start.class);
        ParseXml.init();
    }
}

// xml 在本地时 不依赖spring
class ParseLocalXml{
    public static void main(String[] args) throws Exception {
        ParseXml.init();
        File file = new File("D:\\code\\redis\\springboot-parseFile\\src\\main\\resources\\xml\\aaa_country.xml");
        System.out.println(ParseXml.parse(file, Root.class));
        File file1 = new File("D:\\code\\redis\\springboot-parseFile\\src\\main\\resources\\xml\\bbb_books.xml");
        System.out.println(ParseXml.parse(file1, BookRoot.class));
    }
}